{layout name="common/layout" /}
<section class="panel">
    <header class="panel-heading">
        商品分类添加
        <div class="btn-group  pull-right">
            <a class="btn btn-default " href="javascript:location.reload();"><span class="fa fa-refresh"></span></a>
        </div>
    </header>
    <div class="panel-body">
        {php} if(!empty($gc_info)){ {/php}
        <form class="form-horizontal" method="post">
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">排序</label>
                <div class="col-lg-5">
                    <input type="number" name="gc_sort" class="form-control" value="{$gc_info['gc_sort']}" >
                    <p class="help-block">数字越大,排序越靠前</p>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">分类名称</label>
                <div class="col-lg-5">
                    <input type="text" name="gc_name" class="form-control" value="{$gc_info['gc_name']}" >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">分类图标</label>
                {:tplSingleImage('goodsclass')}
                <div class="row">
                    <div class="col-lg-1 col-sm-1 water-up-2">
                        <input type="hidden" name="goodsclass" value="{$gc_info['gc_icon']}">
                        <img src="{$gc_info['gc_icon']}" width="70px" height="70px">
                        <a class="badge img-badge" onclick="water_delete_up_img(this);"><span class="fa fa-times"></span></a>
                    </div>
                </div>
                <div class="col-lg-5 col-lg-offset-2">建议尺寸(50*50)</div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">分类描述</label>
                <div class="col-lg-5">
                    <input type="text" name="gc_description" class="form-control" value="{$gc_info['gc_description']}" >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">此分类佣金比例</label>
                <div class="col-lg-5 ">
                    <div class="input-group">
                        <input type="number" name="commis_rate" class="form-control" value="{$gc_info['commis_rate']}" style="z-index: 0;">
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">分类广告图</label>
                {:tplSingleImage('classadv')}
                <div class="row">
                    <div class="col-lg-1 col-sm-1 water-up-2">
                        <input type="hidden" name="classadv" value="{$gc_info['gc_banner']}">
                        <img src="{$gc_info['gc_banner']}" width="70px" height="70px">
                        <a class="badge img-badge" onclick="water_delete_up_img(this);"><span class="fa fa-times"></span></a>
                    </div>
                </div>
                <div class="col-lg-10 col-lg-offset-2">建议尺寸(640*320)</div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">分类广告链接</label>
                <div class="col-lg-5">
                    <div class="input-group">
                        <input type="text" name="gc_bannerlink" class="form-control" value="{$gc_info['gc_bannerlink']}" style="z-index: 0;">
                        <span class="input-group-btn">
                            <a class="btn btn-primary" type="button" role="link">选择链接</a>
                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-lg-2 col-sm-2 control-label">是否显示</label>
                <div class="col-lg-5">
                    <input type="radio" name="is_show" value="1" {php}if($gc_info['is_show']==1){ {/php}checked{php} } {/php}>是
                    <input type="radio" name="is_show" value="0" {php}if($gc_info['is_show']==0){ {/php}checked{php} } {/php}>否
                </div>
            </div>
            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-10">
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </div>
        </form>
        {php} }else{ {/php}
        <p class="text-warning text-center">无此分类信息..<p>
        {php} } {/php}
    </div>
</section>
